﻿using System;
using System.IO;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using Paragon;

namespace Paragon.Tests
{
    [TestClass]
    public class TestFileExtension
    {
        [TestMethod]
        public void TestPara()
        {
            var obj = new { Table = new { Name = "Paragons" } };

            FileInfo source = new FileInfo("../../../Paragon.Tests/source.txt");
            string text = source.Para(obj);

            Assert.AreEqual<string>("<code>\r\n\t<sql>\r\n\t\tSELECT\t*\r\n\t\tFROM\tdbo.Paragons\r\n\t</sql>\r\n\t<cs>\r\n\t\tpublic class Paragons\r\n\t\t{\r\n\t\t\tpublic string field1 { get; set; }\r\n\t\t}\r\n\t</cs>\r\n\t<aspx>\r\n\t\t<html>\r\n\t\t\t<body>\r\n\t\t\t\t<table>\r\n\t\t\t\t\t<tr><td>Paragons</td></tr>\r\n\t\t\t\t</table>\r\n\t\t\t</body>\r\n\t\t</html>\r\n\t</aspx>\r\n</code>", text);
        }
    }
}
